#!/bin/bash

binExec="./bin/mysqlSinffier"

arg=$1

if [ "$arg" == "dev" ]
then

    bash ./build.sh
    $binExec

else

    if [ ! -f "$binExec" ]
    then
        bash ./build.sh
    fi

    if [ ! -x "$binExec" ]
    then
        chmod +x $binExec
    fi

    $binExec

fi